home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
c
/
multi_c.exe
/
MULTI_C.DOC
< prev
next >
Wrap
Text File
|
1992-11-08
|
61KB
|
2,357 lines
MULTI-APP V1.0.1
==============================
______________________________
==============================
Documentation Rev 0.3
Copyright 1992 by Jeff Heaton
MULTI-APP V1.0
A MicroGenesis Product
Copyright 1992 by Jeff Heaton
All Rights Reserved
MicroGenesis Software
P.O. Box No 25534
St. Louis, MO 63125
VOICE: (314) 638-2506
DATA:(314) 638-5205 n,8,1,1200-9600
Part I: The Multi-APP Core
Introduction
The MULTI-APP core is the heart of the MULTI-APP system. All classes
in the MULTI-APP system are derived from these "core classes." The
primary purpose of this core is to give all MULTI-APP classes a
consistent interface. Many abstract classes(who
se sole purpose is to define future classes) are defined here, as well
as real classes for file and data handling.
Using the MULTI-APP core you can provide your application with
platform-independent access to the basic system resources that all
applications need. These are the file system, the serial ports, and
basic data structure handling. In addition a spec
ial "error free" compression based communications protocol is provided
to allow you to access other MULTI-APP applications and share
information remotely.
In addition to providing these basic services, MULTI-APP core allows
you to use the MULTI-APP user interface package to produce GUI(graphic
user interface) applications in a platform-independent manner.
MultiApp Core Features:
I. Platform Independent Access to Files:
A. DEVICE compatible for I/O redirection
B. Allows concurrent shared access of files
C. Buffered character access provides maximum speed
D. Fast block read/write functions for record handling
II. Platform Independent Access to Serial Ports:
A. DEVICE compatible for I/O redirection
B. Optional Compression/Error correction(in SOFTWARE)
C. Access to all hardware lines provided by host computer
III. Misc Platform Independent Services:
A. Integer stacks
B. Base classes for linked lists
C. File Maintenance functions
License
The MultiApp system is currently being marketed as ShareWare.
Shareware is a unique software distribution method where you, the
software user, gets to try out the program BEFORE you pay for it. This
is a FULL version of the MultiApp core, and you
get a FULL copy of the text representation of the user manual to
evaluate for a time period of 30(thirty) days. If you wish to continue
using MultiApp after this trial period, or if you publicly release a
program(commercial,shareware, public domain
or any other non-personal use) you MUST register your copy. Upon
registration you will receive the complete source code to the MultiApp
product that you registered. The source code, however, will be for
your exclusive use and may not be distributed
directly. However, applications can be created using source code
modifications.
If you use MultiApp beyond the initial 30 day limit, or publicly
release any application that contains MultiApp code you MUST have
registered MultiApp. To do otherwise is a direct violation of the
MultiApp copyright. However once you have register
ed a MultiApp product you may use it in your own application, royalty
free, for as many applications as you wish.
The following information is not in classes and provide miscellaneous
utility to the MULTI-APP system. Some of the data structures defined
here are only used in the MULTI-APP user interface and are thus only
briefly described.
Contacting MicroGenesis:
Compuserve : 76476,1701
America On-Line : JeffH66
InterNet : S108955@UMRVMA.UMR.EDU
Voice : (314) 638-2506
BBS : (314) 638-1731
Compiler Considerations:
If you want to maximize portablilty between various computer platforms
MultiApp can greatly speed this process. However because even C/C++
compilers interpret the C/C++ standard differently you must account for
these differences in your code. Thes
e are generally only syntactical errors that will show up when you
compile your application on another platform for the first time.
MultiApp does not use pure c++ as its coding standard. Pure C++ can
defiantly be used with MultiApp but since many platforms(particularly
the Macintosh) are lacking in the area of quality C++ compilers we have
developed MultiApp based on a simpler
subset of C++. This is based on Symantec Think C 5's objects
extension. This is basically identical to C++ but without some of
C++'s more complex features. IF you want your application to be
directly compilable on object based C compilers you shou
ld not use the following C++ features:
Function Overloading
Operator Overloading
Function Templates
Parameters To Constructors
Static Objects(ie MYOBJECT obj; is illegal it MUST be
MYOBJECT *obj)
this redefinition(this=this->next is illegal, all other standard this
operations are legal however).
All Functions MUST have prototypes.
Cast all pointer conversions
These are some general rules to follow to ensure that your programs
are compatible with Object C type compilers as well as True C++
compilers. Once multiApp is ported into C++ compilers on both Dos and
Mac these restrictions will not be necessary.
We are currently working on creating a MPW version of MutliApp that
will support full C++, but for now please remember that not all
platforms have as "developed" of a base of C++ compilers as the IBM
platform does.
If you are going to be seriously developing cross-platform
applications than it is suggested that you own a copy of BOTH
Borland/Turbo C++ and Think C so you can see the differences for
yourself. I have not found it to be too much of a problem in o
ur own development. Just treat Think C as the "least common
denominator" and you will do fine. We will also be coming out with a
document further describing Think C/Borland C++ compatibility with the
release of MultiApp UI.
Global Functions:
void beep(void);
This function will cause the users computer to beep.
void c2pas(char *str);
This function will transform str into a pascal string(assuming it was
originally a c string).
void pas2c(char *str);
This function will transform str into a c string(assuming it was
originally a pascal string).
void sleep(int tenths);
This function will wait for tenths 1/10ths of a second.
int timer_check(long tm);
Call this function,with the value timer_set returns, to see if the
time is up. If that time has elapsed then this function returns true.
long timer_set(int tenths);
Sets a timer for tenths 1/10ths of a second. The value that this
function returns should be passed to timer_check to determine if that
time has elapsed.
void timer_wait(long tm);
Call this function with the value timer_set returns to wait until that
amount of time elapses.
void updcrc(unsigned char b);
Each call of this function causes b to be calculated into the global
crc.
extern unsigned short crc;
This variable is used with updcrc to calculate a CRC value. After
you are done feeding